Holds all information required for an image, with ownership over the data. More...
Public Member Functions | |
Image () | |
Image (nkMemory::Buffer &&data) | |
Image (nkMemory::Buffer &&data, unsigned int width, unsigned int height, PIXEL_FORMAT format) | |
Image (nkMemory::Buffer &&data, unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelByteSize, unsigned int rowByteSize) | |
Image (const Image &other) | |
Image (Image &&other) | |
~Image () | |
virtual unsigned char * | getDataPtr () const override |
const nkMemory::Buffer & | getData () const |
Image & | operator= (const Image &other) |
Image & | operator= (Image &&other) |
![]() | |
ImageBase () | |
ImageBase (unsigned int width, unsigned int height, PIXEL_FORMAT format) | |
ImageBase (unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelByteSize, unsigned int rowByteSize) | |
ImageBase (const ImageBase &other) | |
ImageBase (ImageBase &&other) | |
virtual | ~ImageBase () |
unsigned int | getWidth () const |
unsigned int | getHeight () const |
unsigned int | getDepth () const |
PIXEL_FORMAT | getFormat () const |
unsigned int | getPixelByteSize () const |
unsigned int | getRowByteSize () const |
unsigned int | getSliceByteSize () const |
void | setWidth (unsigned int value) |
void | setHeight (unsigned int value) |
void | setDepth (unsigned int value) |
void | setFormat (PIXEL_FORMAT value) |
void | setPixelByteSize (unsigned int value) |
void | setRowByteSize (unsigned int value) |
void | setSliceByteSize (unsigned int value) |
nkMaths::Vector | getPixel (unsigned int x, unsigned int y, unsigned int z=1) |
ImageBase & | operator= (const ImageBase &other) |
ImageBase & | operator= (ImageBase &&other) |
Holds all information required for an image, with ownership over the data.
See ImageBase for more information.
nkImages::Image::Image | ( | ) |
Default constructor.
nkImages::Image::Image | ( | nkMemory::Buffer && | data | ) |
Data-move constructor.
data | The buffer which data should be part of the image. |
nkImages::Image::Image | ( | nkMemory::Buffer && | data, |
unsigned int | width, | ||
unsigned int | height, | ||
PIXEL_FORMAT | format | ||
) |
Simple 2D image constructor.
data | The buffer which data should be part of the image. |
width | The width of the image, in pixels. |
height | The height of the image, in pixels. |
format | The format of the image. |
nkImages::Image::Image | ( | nkMemory::Buffer && | data, |
unsigned int | width, | ||
unsigned int | height, | ||
unsigned int | depth, | ||
PIXEL_FORMAT | format, | ||
unsigned int | pixelByteSize, | ||
unsigned int | rowByteSize | ||
) |
Aligned 2D image constructor.
data | The buffer which data should be part of the image. |
width | The width of the image, in pixels. |
height | The height of the image, in pixels. |
depth | The depth of the image, in number of slices of width * height images. |
format | The format of the image. |
pixelByteSize | The size of a pixel, in bytes. |
rowByteSize | The size of a row, in bytes. |
nkImages::Image::Image | ( | const Image & | other | ) |
Copy constructor. Will make a copy of the data.
other | The image to copy from. |
nkImages::Image::Image | ( | Image && | other | ) |
Move constructor. Will move the data over.
other | The image to move. |
nkImages::Image::~Image | ( | ) |
Destructor.
|
overridevirtual |
Implements nkImages::ImageBase.
const nkMemory::Buffer& nkImages::Image::getData | ( | ) | const |
Copy assignment operator.
other | The image to copy and assign. |
Move assignment operator.
other | The image to move and assign. |